import React,{Component} from 'react';
import {Button} from 'react-native'

export default class Demo12Component extends Component{
  
  handlePress=()=>{
    //向服务器发请求，并将结果输出到控制台
    fetch("http://172.163.100.139/ajia_code/data/product/list.php")
    .then((response)=>
      {return response.json()})
    .then((result)=>{
      console.log(result);
    })
     
  }

  render(){
    return <Button 
    onPress={this.handlePress} 
    title='clickMe'>
    </Button>
  }
}

